package com.naiterui.ehp.bs.emr.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.naiterui.ehp.bs.emr.vo.amc.AmcResultVO;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author wangzehao
 */
@ApiModel(value = "RecordPaitentCaseVO", description = "患者上传病历")
public class RecordPaitentCaseVO implements Serializable {

    /**
     * 字段或域定义：<code>serialVersionUID</code>
     */
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "发送医生id")
    @JsonInclude(Include.NON_NULL)
    private Long doctorId;// 发送医生id

    @ApiModelProperty(value = "医生姓名")
    @JsonInclude(Include.NON_NULL)
    private String doctorName;// 医生姓名

    @ApiModelProperty(value = "医生姓名")
    @JsonInclude(Include.NON_NULL)
    private String department;// 科室

    @ApiModelProperty(value = "医院名称")
    @JsonInclude(Include.NON_NULL)
    private String hospitalName;// 医院名称

    @ApiModelProperty(value = "患者id")
    @JsonInclude(Include.NON_NULL)
    private Long patientId;// 患者id

    @ApiModelProperty(value = "患者姓名")
    @JsonInclude(Include.NON_NULL)
    private String name;// 患者姓名

    @ApiModelProperty(value = "患者性别0女1男")
    @JsonInclude(Include.NON_NULL)
    private Integer gender;   // 0女1男

    @ApiModelProperty(value = "年龄")
    @JsonInclude(Include.NON_NULL)
    private Integer age; // 年龄

    @ApiModelProperty(value = "年龄单位:岁，月，周")
    @JsonInclude(Include.NON_NULL)
    private String ageUnit; // 年龄单位:岁，月，周

    @ApiModelProperty(value = "0：父亲；1：母亲；2：兄弟姐妹；3：子女；4：丈夫；5：妻子；6：本人；7：其他家庭成员")
    @JsonInclude(Include.NON_NULL)
    private Integer relation;// 0：父亲；1：母亲；2：兄弟姐妹；3：子女；4：丈夫；5：妻子；6：本人；7：其他家庭成员

    @ApiModelProperty(value = "婚姻状态，0：未婚；1：已婚")
    @JsonInclude(Include.NON_NULL)
    private Short maritalStatus;

    @ApiModelProperty(value = "孕期，哺乳期，不知道 ")
    @JsonInclude(Include.NON_NULL)
    private String pregnancy;

    @ApiModelProperty(value = "身高")
    @JsonInclude(Include.NON_NULL)
    private Integer height;

    @ApiModelProperty(value = "体重")
    @JsonInclude(Include.NON_NULL)
    private Integer weight;

    @ApiModelProperty(value = "病情描述")
    @JsonInclude(Include.NON_NULL)
    private String description;

    @ApiModelProperty(value = "amc诊断结果 ")
    @JsonInclude(Include.NON_NULL)
    private AmcResultVO amcResult;

    @ApiModelProperty(value = "过敏药物")
    @JsonInclude(Include.NON_NULL)
    private String medicAllergys;

    @ApiModelProperty(value = "过往病史")
    @JsonInclude(Include.NON_NULL)
    private String pastDiseases;

    @ApiModelProperty(value = "家族病史")
    @JsonInclude(Include.NON_NULL)
    private String familyDiseases;

    @ApiModelProperty(value = "遗传病")
    @JsonInclude(Include.NON_NULL)
    private String hereditaryDiseases;

    @ApiModelProperty(value = "吸烟情况")
    @JsonInclude(Include.NON_NULL)
    private String smoke;

    @ApiModelProperty(value = "饮酒情况")
    @JsonInclude(Include.NON_NULL)
    private String drink;

    @ApiModelProperty(value = "医嘱图片列表")
    @JsonInclude(Include.NON_NULL)
    private List<MCaseFileImgVO> adviceList = new ArrayList<>();

    @ApiModelProperty(value = "处方单图片列表")
    @JsonInclude(Include.NON_NULL)
    private List<MCaseFileImgVO> prescriptionList = new ArrayList<>();

    @ApiModelProperty(value = "检验单图片列表")
    @JsonInclude(Include.NON_NULL)
    private List<MCaseFileImgVO> checkList = new ArrayList<>();

    @ApiModelProperty(value = "发送时间（yyyy-MM-dd hh:mm）")
    @JsonInclude(Include.NON_NULL)
    private String createDate;// 发送时间"

    @ApiModelProperty(value = "创建时间戳")
    @JsonInclude(Include.NON_NULL)
    private Long createAt;// 创建时间戳

    @ApiModelProperty(value = "问诊时间戳")
    @JsonInclude(Include.NON_NULL)
    private Long vistingTime;

    @ApiModelProperty(value = " 患者病历完成时间戳")
    @JsonInclude(Include.NON_NULL)
    private Long finishTime;

    /**
     * 病历作废 0：正常 1：作废
     */
    @ApiModelProperty(value = "病历作废状态 0：正常 1：作废")
    private Integer invalid;

    /**
     * 病历作废时间
     */
    @ApiModelProperty(value = "病历作废时间")
    private String invalidTime;

    public Short getMaritalStatus() {
        return this.maritalStatus;
    }

    public void setMaritalStatus(Short maritalStatus) {
        this.maritalStatus = maritalStatus;
    }

    public String getPregnancy() {
        return pregnancy;
    }

    public void setPregnancy(String pregnancy) {
        this.pregnancy = pregnancy;
    }

    public Integer getHeight() {
        return this.height;
    }

    public void setHeight(Integer height) {
        this.height = height;
    }

    public Integer getWeight() {
        return this.weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public AmcResultVO getAmcResult() {
        return this.amcResult;
    }

    public void setAmcResult(AmcResultVO amcResult) {
        this.amcResult = amcResult;
    }

    public String getMedicAllergys() {
        return this.medicAllergys;
    }

    public void setMedicAllergys(String medicAllergys) {
        this.medicAllergys = medicAllergys;
    }

    public String getPastDiseases() {
        return this.pastDiseases;
    }

    public void setPastDiseases(String pastDiseases) {
        this.pastDiseases = pastDiseases;
    }

    public String getFamilyDiseases() {
        return this.familyDiseases;
    }

    public void setFamilyDiseases(String familyDiseases) {
        this.familyDiseases = familyDiseases;
    }

    public String getHereditaryDiseases() {
        return this.hereditaryDiseases;
    }

    public void setHereditaryDiseases(String hereditaryDiseases) {
        this.hereditaryDiseases = hereditaryDiseases;
    }

    public String getSmoke() {
        return this.smoke;
    }

    public void setSmoke(String smoke) {
        this.smoke = smoke;
    }

    public String getDrink() {
        return this.drink;
    }

    public void setDrink(String drink) {
        this.drink = drink;
    }

    public List<MCaseFileImgVO> getAdviceList() {
        return this.adviceList;
    }

    public void setAdviceList(List<MCaseFileImgVO> adviceList) {
        this.adviceList = adviceList;
    }

    public List<MCaseFileImgVO> getPrescriptionList() {
        return this.prescriptionList;
    }

    public void setPrescriptionList(List<MCaseFileImgVO> prescriptionList) {
        this.prescriptionList = prescriptionList;
    }

    public List<MCaseFileImgVO> getCheckList() {
        return this.checkList;
    }

    public void setCheckList(List<MCaseFileImgVO> checkList) {
        this.checkList = checkList;
    }

    public Long getDoctorId() {
        return this.doctorId;
    }

    public void setDoctorId(Long doctorId) {
        this.doctorId = doctorId;
    }

    public String getDoctorName() {
        return this.doctorName;
    }

    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }

    public String getDepartment() {
        return this.department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    public String getHospitalName() {
        return this.hospitalName;
    }

    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }

    public Long getPatientId() {
        return this.patientId;
    }

    public void setPatientId(Long patientId) {
        this.patientId = patientId;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getGender() {
        return this.gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public Integer getAge() {
        return this.age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getAgeUnit() {
        return this.ageUnit;
    }

    public void setAgeUnit(String ageUnit) {
        this.ageUnit = ageUnit;
    }

    public String getCreateDate() {
        return this.createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public Integer getRelation() {
        return this.relation;
    }

    public void setRelation(Integer relation) {
        this.relation = relation;
    }

    public Long getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Long createAt) {
        this.createAt = createAt;
    }

    public Long getVistingTime() {
        return vistingTime;
    }

    public void setVistingTime(Long vistingTime) {
        this.vistingTime = vistingTime;
    }

    public Long getFinishTime() {
        return finishTime;
    }

    public void setFinishTime(Long finishTime) {
        this.finishTime = finishTime;
    }

    public Integer getInvalid() {
        return invalid;
    }

    public void setInvalid(Integer invalid) {
        this.invalid = invalid;
    }

    public String getInvalidTime() {
        return invalidTime;
    }

    public void setInvalidTime(String invalidTime) {
        this.invalidTime = invalidTime;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

    public enum EPregnancy {
        /**
         * 哺乳期
         */
        PREGNANCY_PREGNANCY(1, "哺乳期"),
        /**
         * 孕期
         */
        PREGNANCY_LACTATION(2, "孕期"),
        /**
         * 不知道
         */
        PREGNANCY_NOTHING(3, "不知道");
        private Integer value;
        private String name;

        EPregnancy(Integer value, String name) {
            this.value = value;
            this.name = name;
        }

        public static EPregnancy val(Integer value) {
            // values()方法返回enum实例的数组
            return Arrays.stream(values()).filter(s -> value.intValue() == s.getValue().intValue()).findFirst().orElse(null);
        }

        public Integer getValue() {
            return value;
        }

        public void setValue(Integer value) {
            this.value = value;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

}
